home *** CD-ROM | disk | FTP | other *** search
- #ifndef __TYPES__
- #include <Types.h>
- #endif
- #include <Files.h>
- #ifndef __QUICKDRAW__
- #include <QuickDraw.h>
- #endif
- #include <Packages.h>
- #include <Memory.h>
- #ifndef __EVENTS__
- #include <Events.h>
- #endif
- #include <OSUtils.h>
- #include <ToolUtils.h>
- #include <Menus.h>
- #include <Dialogs.h>
- #include <Errors.h>
- #include <SysEqu.h>
- #include <GestaltEqu.h>
- #include <Resources.h>
- #include <Finder.h>
- #include <PictUtil.h>
- #include <palettes.h>
- #include <OSEvents.h>
- #ifndef __WINDOWS__
- #include <Windows.h>
- #endif
-
- #ifndef __STANDARDFILE__
- #include <StandardFile.h>
- #endif
-
-
- #ifndef THINK_C
- #include <pascal.h>
- #include <BDC.h>
- #include <Strings.h>
- #endif
-
-
- #include <ImageCompression.h>
- #include <QuickTimeComponents.h>
- #include <Movies.h>
-
-
- #define kExportMenu 155
- #define kMyCustomSaveDialog 130
-
- #define kNumberSteps 30
- #define kFrameRate 10 /* frames per second */
- #define kCodecID anyCodec
- #define kCodecType (CodecType) 'rpza'
- #define kCodecDepth 32
- #define kCodecQuality codecNormalQuality
-
- extern Boolean gHasNewStdFile;
-
- extern CWindowPtr gSrcWindow; // Image source 1
- extern CWindowPtr gAltWindow; // Image source 2
- extern CWindowPtr gDstWindow; // Window used to display preview stages of movie
- extern RGBColor BACKColor; // Background Fill Color (Used in Slide Pict, etc...)
- extern WindowPtr gActiveWindow;
-
- extern Rect gOriginalPicFrame;
- extern PicHandle gOriginalPicture;
-
- extern GWorldPtr gWorld; // Image source 1
- extern GWorldPtr gAltWorld; // Image source 2
- extern GWorldPtr gDstWorld; // Area used to create the image to be added to movie
- extern GWorldPtr gBufferWorld;
-
- extern MenuHandle gMenus[6];
- extern Boolean gExitFlag;
-
- extern SCParams gStandardP;
-
- extern Boolean gOversample;
- extern Boolean gReverse;
-
- extern long gFrameNumber;
-
- extern long gNumberSteps;
- extern Boolean gRequiresAlternate; // if true means requires second picture for processing
- extern short gEffectType; // type of processing to do ( set for crossfade, set to false to do random dot stereograms )
- extern short gEffectDirection; // left, right, up, down, etc.
-
- #define APPLE_MENU 0
- #define APPLE_MENU_ID 128
-
- #define FILE_MENU 1
- #define FILE_MENU_ID 129
-
- enum { FILE_M_OPEN=1,
- FILE_M_CLOSE,
- FILE_M_SAVE,
- fileImport = 5,
- fileExport,
- FILE_M_QUIT =8
- };
-
- #define EDIT_MENU 2
- #define EDIT_MENU_ID 130
- #define EDIT_M_UNDO 1
- #define EDIT_M_CUT 3
- #define EDIT_M_COPY 4
- #define EDIT_M_PASTE 5
- #define EDIT_M_CLEAR 6
-
- #define MOVIE_MENU 3
- #define MOVIE_MENU_ID 131
-
- #define MOVIE_M_COMPRESS 1
- #define MOVIE_M_STAGES 2
- #define MOVIE_M_OVERSAMPLE 3
- #define MOVIE_M_PREVIEW 5
- #define MOVIE_M_MOVIE 7
- #define MOVIE_M_APPEND MOVIE_M_MOVIE + 1
-
- enum { /* Direction Menu */
- Direction_Menu=5,
- Direction_MenuID=30,
-
- EFFECT_BACKWARDS = 1,
- Effect_line1,
- EFFECT_Roll_Left,
- EFFECT_Roll_Right,
- EFFECT_Roll_Down,
- EFFECT_Roll_Up,
- EFFECT_Roll_UpperRight,
- EFFECT_Roll_LowerRight,
- EFFECT_Roll_LowerLeft,
- EFFECT_Roll_UpperLeft
- };
-
- enum { EFFECT_MENU=4,
- EFFECT_MENU_ID=132,
- Effect_Direct = 1,
- Effect_line2,
- EFFECT_BACKColor,
- Effect_line3,
- EFFECT_CrossFad,
- EFFECT_Slide,
- EFFECT_Roll,
- EFFECT_StereoGram,
- Effect_AdobeWipe,
- EFFECT_CircleWipe,
- EFFECT_ClockWipe
- };
-
- /*********************************************
-
- Funtion prototypes.
-
- */
-
- Boolean HandleEvents(EventRecord *myEvent);
- OSErr DoOpen(FSSpec *fsp);
- long rand(long reseed);
- unsigned char DecodeDepth(unsigned char pix);
-
- void DoCrossFade(long stageNum,long totalStages,Boolean reverse);
-
-
- void DoRandomDotStereogram(long stageNum,long totalStages,Boolean reverse);
-
- void DoStage(long stageNum,long totalStages,Boolean reverse);
-
-
- void DoClear();
-
- void DoUpdate(CWindowPtr wind);
-
- void DoPreview(Boolean dialog);
-
- pascal Boolean myImportFileFilter(ParmBlkPtr PB);
- void importMovie(void);
-
- pascal Boolean myExportFileFilter(ParmBlkPtr PB);
- pascal short myDlgHook(short item, DialogPtr theDialog, short *whichConverter);
- void exportMovie(void);
-
- void Error(char *msg,OSErr code);
-
- OSErr DoMovie(Boolean Append);
-
- Boolean OptionDown(void);
- Boolean ShiftDown(void);
-